
#include "Box2D/Box2D.h"
#include <SFML/System.hpp>
#include <SFML/Network.hpp>
#include <iostream>

#define DEFAULT_PORT 4567

int main()
{
    //
    // Box2D Stuff
    //
    b2Vec2 gravity = b2Vec2(0.0f,0.0f);
    b2World* gameWorld = new b2World(gravity);
    float32 timeStep = 1.0f / 30.f;
    int32 velocityIterations = 10;
    int32 positionIterations = 8;

    /*gameWorld->Step(timeStep, velocityIterations, positionIterations);

    while(1){
        gameWorld->Step(timeStep, velocityIterations, positionIterations);
    }*/

    // Create a socket and connect it to 192.168.1.50 on port 55001
    sf::TcpSocket socket;
    socket.connect("127.0.0.1", DEFAULT_PORT);

    // Send a message to the connected host
    std::string message = "Hi, I am a client";
    socket.send(message.c_str(), message.size() + 1);

    // Receive an answer from the server
    char buffer[1024];
    std::size_t received = 0;
    socket.receive(buffer, sizeof(buffer), received);
    std::cout << "The server said: " << buffer << std::endl;



    return 0;
}



